﻿// JScript 文件
// 志兵
// 用于跟踪订单

var Url = location.href;
var Url_ = Url.split("?");
if(Url_.length>1 && Url_[1]!="")
{
    var Url__ = Url_[1].split("&");
    var Source = "";
    var SourceSunInfo = "";
    for(var i=0;i<Url__.length;i++)
    {
        var Url___ = Url__[i].split("=");
        if(Url___.length>1)
        {
            if(Url___[0].toLowerCase()=="source")
            {
                Source = Url___[1];
            }else if(Url___[0].toLowerCase()=="sourcesuninfo")
            {
                SourceSunInfo = Url___[1];
            }
        }
    }
    if(Source!="")
    {
        document.write("<script src='http://shopping.vancl.com/PublicControls/GetSource.aspx?Source=" + Source +"&SourceSunInfo="+SourceSunInfo+"'><\/script>");
        //var send;
        //var Url = '/PublicControls/GetSource.aspx?Source=' + Source +'&SourceSunInfo='+SourceSunInfo;
        //Send_Xml(send,Url);
    }
}

function createXMLHTTPRequest(objct)
{
    if (window.ActiveXObject)
    {
    // Microsoft Way
     objct = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if (window.XMLHttpRequest)
    {
     // Others
     objct = new XMLHttpRequest();
    }
    return objct;

}
function Send_Xml(cddoc,Url)
{
    cddoc = createXMLHTTPRequest(cddoc);
    cddoc.open('GET',Url,true);
    cddoc.send(null);

}